//
//  MainCollectionViewCell.m
//  KaKaWallet
//
//  Created by admin on 2016/10/24.
//  Copyright © 2016年 ibendi. All rights reserved.
//

#import "MainCollectionViewCell.h"


@implementation MainCollectionViewCell



- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        self.contentView.backgroundColor = [UIColor whiteColor];
        

        
        self.kkImgView = [UIImageView new];
        [self.contentView addSubview:self.kkImgView];
        
        self.kkTitleLbl = [UILabel new];
        self.kkTitleLbl.font = [UIFont systemFontOfSize:14];
        self.kkTitleLbl.textColor = UIColorHex(0x333333);
        [self.contentView addSubview:self.kkTitleLbl];
        
        self.kkMoneyLbl = [UILabel new];
        [self.contentView addSubview:self.kkMoneyLbl];
        self.kkMoneyLbl.font = [UIFont systemFontOfSize:18];
        self.kkMoneyLbl.textColor = UIColorHex(0x06b99b);
        
        
        self.kkContentLbl = [UILabel new];
        [self.contentView addSubview:self.kkContentLbl];
        self.kkContentLbl.textColor = UIColorHex(0x999999);
        self.kkContentLbl.font = [UIFont systemFontOfSize:12.0f];
        self.kkContentLbl.numberOfLines = 2;
        
        
        self.kkTitleLbl.text = @"fsdfdsfdsfdsfdsfds";
        self.kkMoneyLbl.text = @" $20";
        self.kkContentLbl.text = @"[self.kkBkVew mas_makeConstraints:^(MASConstraintMaker *make) ";
        
        self.kkImgView.backgroundColor = [UIColor redColor];
    }
    return self;
}

-(void)layoutSubviews
{
    [super layoutSubviews];
    
//    [self.kkBkVew mas_makeConstraints:^(MASConstraintMaker *make) {
//        make.edges.equalTo(self.contentView).with.insets(UIEdgeInsetsMake(0, 0, 0, 0));
//    }];
    
    
    [self.kkImgView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.and.left.and.right.mas_equalTo(self.contentView).offset(0);
        make.height.mas_equalTo(@130);
    }];
    
    
    [self.kkTitleLbl mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.kkImgView.mas_bottom).offset(5);
        make.left.mas_equalTo(self.contentView.mas_left).offset(10);
        make.right.mas_equalTo(self.contentView.mas_right).offset(-50);
        make.height.mas_equalTo(@20);
    }];
    
    [self.kkMoneyLbl mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.kkTitleLbl.mas_bottom).offset(5);
        make.left.mas_equalTo(self.contentView.mas_left).offset(10);
        make.right.mas_equalTo(self.contentView.mas_right).offset(-10);
        make.height.mas_equalTo(@25);
    }];
    
    [self.kkContentLbl mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.kkMoneyLbl.mas_bottom).offset(5);
        make.left.mas_equalTo(self.contentView.mas_left).offset(10);
        make.right.mas_equalTo(self.contentView.mas_right).offset(-10);
        make.bottom.mas_equalTo(self.contentView.mas_bottom).offset(-5);

    }];
    
    
    
    
    
    
}

@end
